<%-- 
    Document   : header
    Created on : Sep 17, 2011, 9:55:15 AM
    Author     : Sammy
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<!DOCTYPE html>
<!--[if IE 6]>
<html id="ie6" dir="ltr" lang="en">
<![endif]-->
<!--[if IE 7]>
<html id="ie7" dir="ltr" lang="en">
<![endif]-->
<!--[if IE 8]>
<html id="ie8" dir="ltr" lang="en">
<![endif]-->
<!--[if !(IE 6) | !(IE 7) | !(IE 8)  ]><!-->
<html dir="ltr" lang="en">
    <!--<![endif]-->
    <head>
        <meta charset="UTF-8" />
        <meta name="viewport" content="width=device-width" />
        <meta http-equiv="content-type" content="text/html; charset=utf-8" />
        <title>${sessionScope.companyName} - ${title}</title>
        <link rel="stylesheet" href="assets/css/base.css" type="text/css" media="screen, projection" />
        <link type="text/css" href="assets/css/ui-lightness/jquery-ui-1.8.16.custom.css" rel="stylesheet" />	
        <script type="text/javascript" src="assets/js/jquery-1.6.4.min.js"></script>
        <script type="text/javascript" src="assets/js/jquery-ui-1.8.16.custom.min.js"></script>
        <script type="text/javascript" src="assets/js/validator.js"></script>
    </head>
    <body class="
          <c:choose>
              <c:when test="${title == 'Home'}">home</c:when>
              <c:otherwise>blog</c:otherwise>
          </c:choose>">
        <div class="container">
            <header class="site-header" role="banner">
                <h1><a href="./"><img src="assets/img/logo.png" alt="${sessionScope.companyName}"></a></h1>
                <nav>
                    <ul>
                        <c:if test="${sessionScope.authenticated == true}">
                            <c:if test="${sessionScope.user.getRoleId() > 2}">
                                <li>
                                    <a>Service</a>
                                    <ul>
                                        <li><a href="./shuttles">Shuttle</a></li>
                                        <li><a href="./buses">Bus</a></li>
                                        <li><a href="./flights">Flight</a></li>
                                    </ul>
                                </li>
                            </c:if>
                        </c:if>
                        <c:if test="${sessionScope.user.getRoleId() == 2}">
                            <li>
                                <a>Manage</a>
                                <ul>
                                    <li><a href="./shuttles?action=manage">Shuttle</a></li>
                                    <li><a href="./buses?action=manage">Bus</a></li>
                                    <li><a href="./flights?action=manage">Flight</a></li>
                                    <li><a href="./shippings?action=manage">Shippings</a></li>
                                </ul>
                            </li>
                            <li>
                                <a>Report</a>
                                <ul>
                                    <li><a href="./shuttles?action=report">Shuttle</a></li>
                                    <li><a href="./buses?action=report">Bus</a></li>
                                    <li><a href="./flights?action=report">Flight</a></li>
                                    <li><a href="./shippings?action=report">Shippings</a></li>
                                </ul>
                            </li>
                        </c:if>
                        <c:if test="${sessionScope.user.getRoleId() == 3}">
                            <li>
                                <a>Manage</a>
                                <ul>
                                    <li><a href="./payments?action=manage">Payments</a></li>
                                    <li><a href="./shippings?action=manage">Shippings</a></li>
                                </ul>
                            </li>
                            <li>
                                <a>Bookings</a>
                                <ul>
                                    <li><a href="./shuttles?action=view_book">Shuttle</a></li>
                                    <li><a href="./buses?action=view_book">Bus</a></li>
                                    <li><a href="./flights?action=view_book">Flight</a></li>
                                </ul>
                            </li>
                        </c:if>
                        <c:choose>
                            <c:when test="${sessionScope.authenticated == true}">
                                <c:choose>
                                    <c:when test="${sessionScope.user.getRoleId() == 1}">
                                        <li><a href="./users?action=manage">Users</a></li>
                                        <li><a href="./settings?action=edit">Settings</a></li>
                                    </c:when>
                                    <c:otherwise>
                                        <li><a href="./users?action=edit">Profile</a></li>
                                        <li><a href="./payments?action=confirm">Confirm</a></li>
                                    </c:otherwise>
                                </c:choose>
                                <li><a href="users?action=logout">Logout</a></li>
                            </c:when>
                            <c:otherwise>
                                <li><a href="users?action=signup">Sign Up</a></li>
                                <li><a href="users?action=login">Login</a></li>
                            </c:otherwise>
                        </c:choose>
                    </ul>
                </nav>
            </header>
            <c:if test="${sessionScope.flash != null}">
                <div class="flash">
                    <p>${sessionScope.flash}</p>
                </div>
                <% session.setAttribute("flash", null);%>
            </c:if>
            <div class="content">
